namespace hjc {

	export class SingletonSystem extends System {

		protected $concerns = [Camera];
		protected execute(entities: Entity[], param: TimeParam): void {
			let camera = game.camera;
			if (camera.checkPfc() && !!camera.entity && !!camera.map) {
				let [pos, mw, mh, sw, sh] = [camera.entity.position, camera.map.width,
				camera.map.height, game.curScene.width, game.curScene.height];
				camera.map.y = utils.num(sh / 2 - pos.y, 0, sh - mh, 0);
				camera.map.x = utils.num(sw / 2 - pos.x, 0, sw - mw, 0);
			}
		}
		protected entities(): Entity[] { return []; }
	}
}